<template>
  <div class="not-found-page">
    <div class="not-found-container">
      <div class="not-found-content">
        <div class="error-code">404</div>
        <h1 class="error-title">页面未找到</h1>
        <p class="error-description">
          抱歉，您访问的页面不存在或已被移除。
        </p>
        <div class="error-actions">
          <el-button type="primary" @click="goHome">
            返回首页
          </el-button>
          <el-button @click="goBack">
            返回上页
          </el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
const router = useRouter()

const goHome = () => {
  router.push('/')
}

const goBack = () => {
  router.go(-1)
}

onMounted(() => {
  document.title = '页面未找到 - 智能体问答系统'
})
</script>

<style lang="scss" scoped>
.not-found-page {
  height: 100vh;
  @include flex-center;
  background: var(--bg-color);
}

.not-found-container {
  text-align: center;
  max-width: 500px;
  padding: var(--spacing-xl);
}

.error-code {
  font-size: 120px;
  font-weight: bold;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: var(--spacing-md);
}

.error-title {
  font-size: var(--font-size-extra-large);
  color: var(--text-color-primary);
  margin-bottom: var(--spacing-md);
}

.error-description {
  font-size: var(--font-size-base);
  color: var(--text-color-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-lg);
}

.error-actions {
  @include flex-center;
  gap: var(--spacing-md);
}
</style>